package com.company.indicationshots.util;

import java.util.ArrayList;
import java.util.List;
//获取字符串所有字符0所在的位置集合
public class FindZeroIndices {

    public static List<Integer> zeroIndices(String str) {
        List<Integer> indices = new ArrayList<>();
        for (int i = 0; i < str.length(); i++) {
            if (str.charAt(i) == '0') {
                indices.add(i+1);
            }
        }
        return indices;
    }

}
